package cn.lk.netty.rpc.netty;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

/**
 * @ClassName ThreadPool
 * @Deseription TODO
 * @Author hu'nan
 * @Date 2020/4/5 17:15
 * @Version 1.0
 **/
public class ThreadPool {

    private static final ThreadPool pool = new ThreadPool();

    public static ThreadPool newInstance(){
        return pool;
    }
    private static final ScheduledExecutorService scheduledPool = Executors.newScheduledThreadPool(5);

    /**
     * 执行定时任务的线程池
     * @return
     */
    public ScheduledExecutorService scheduledPool(){
        return scheduledPool;
    }
}
